bitkeeper revision 1.1098.1.2 (4107d1daarfb__XMoCtKug7vXc1-4w)
authorsos22@donkeykong.cl.cam.ac.uk <sos22@donkeykong.cl.cam.ac.uk>
Wed, 28 Jul 2004 16:18:34 +0000 (16:18 +0000)
committersos22@donkeykong.cl.cam.ac.uk <sos22@donkeykong.cl.cam.ac.uk>
Wed, 28 Jul 2004 16:18:34 +0000 (16:18 +0000)
Random tidy-ups.

xen/Rules.mk
xen/arch/x86/Rules.mk
xen/arch/x86/xdb.c
xen/common/kernel.c

index 6073e113c20fc8df270685764b9ee73e4894414a..af8399e5a4bd99d31752a9d427148aaedfceaad9 100644 (file)
@@ -43,7 +43,7 @@ CFLAGS += -DNDEBUG
 endif
 
 ifeq ($(debugger),y)
-CFLAGS += -DXEN_DEBUGGER
+CFLAGS += -DXEN_DEBUGGER -g
 endif
 
 ifeq ($(perfc),y)
index 2ecca1fffed8470a22fc08b501a99da2487de347..257fffedc3ff439eac4cd046dce7d15cda9522dd 100644 (file)
@@ -4,8 +4,8 @@
 CC := gcc
 LD := ld
 
-CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -O3
-CFLAGS  += -iwithprefix include -Wall -Werror -fomit-frame-pointer -pipe
+CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS  += -iwithprefix include -Wall -Werror -pipe
 CFLAGS  += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
 
 ifeq ($(TARGET_SUBARCH),x86_32)
@@ -13,6 +13,12 @@ CFLAGS  += -m32 -march=i686
 LDFLAGS := --oformat elf32-i386 
 endif
 
+ifeq ($(debugger),y)
+CFLAGS += -O2
+else
+CFLAGS += -O3 -fomit-frame-pointer
+endif
+
 ifeq ($(TARGET_SUBARCH),x86_64)
 CFLAGS  += -m64 -mno-red-zone -fpic -fno-reorder-blocks
 CFLAGS  += -fno-asynchronous-unwind-tables
index 8548953108e40cb7e9feaeb2b80a52994652f33e..8074e12fd75f7f531d315fecb35f9b26dcb4d45e 100644 (file)
@@ -40,17 +40,7 @@ hex_char_val(unsigned char c)
                return c - 'A' + 10;
        else
                BUG();
-}
-
-static unsigned char
-val_to_hex_char(unsigned val)
-{
-       if (val < 10)
-               return val + '0';
-       else if (val < 16)
-               return val - 10 + 'a';
-       else
-               BUG();
+       return -1;
 }
 
 /* Receive a command.  Returns -1 on csum error, 0 otherwise. */
@@ -344,11 +334,11 @@ __trap_to_xendbg(struct pt_regs *regs)
                return;
        }
        xendbg_running = 1;
-       /* trap_to_xendbg gets esp slightly wrong.  Correct for this. */
-       regs->esp += 8;
 
-       dbg_printk("Waiting for GDB to attach to XenDBG\n");
-       /* Urgg... hope this is right... */
+       /* Shouldn't really do this, but otherwise we stop for no
+          obvious reason, which is Bad */
+       printk("Waiting for GDB to attach to XenDBG\n");
+
        while (resume == 0) {
                r = receive_command(recv_buf);
                if (r < 0) {
index 0864c9fab7868e3e6a18ff1eee86b07cd770f9d0..cfebb1daad0e4de78c32bc87655f709fe0978063 100644 (file)
@@ -112,7 +112,6 @@ static struct {
 
 
 void initialize_xendbg(void);
-void trap_to_xendbg(void);
 
 void cmain(multiboot_info_t *mbi)
 {
@@ -299,10 +298,6 @@ void cmain(multiboot_info_t *mbi)
 
     shadow_mode_init();
 
-    printk("Trapping to debugger.\n");
-    trap_to_xendbg();
-    printk("Trapped to debugger and came back.\n");
-
     /*
      * We're going to setup domain0 using the module(s) that we stashed safely
      * above our heap. The second module, if present, is an initrd ramdisk.